Set Color and Brightness of LED
Function:
magicbox.set_led_color(port, index, color, value)Description: set the color and brightness of Light n
Required parameter:
- port: controller port. data type: int, range: 1~6
- index: position of light. data type: int, range: 1~3
- color: color string. data type: str, range: "red", "green", "blue", "yellow", "white"
- value: brightness value. data type: int, range: 0~100
- Return:
- True: The command has been finished.
- False: The command has not been finished.
Example
magicbox.set_led_color(port=1, index=1, color="yellow", value=50)Set the color of the first light connected to Port 1 of controller to yellow, and brightness to 50.